package mahjong;
import java.io.Serializable;
import java.util.ArrayList;
/**
 * This class keeps track of high score lists
 */
public class HighScores implements Serializable 
{

	private ArrayList<HighScoreList> highscores;
	
	public HighScores()
	{
		highscores = new ArrayList<HighScoreList>();
	}
	
	public HighScoreList getHighScores(String layout)
	{
		for(HighScoreList hl : highscores)
		{
			if(hl.getLayout().equals(layout))
			{
				//System.out.println("Here!");
				return hl;
			}
		}
		
		HighScoreList hl = new HighScoreList(layout);
		
		highscores.add(hl);
		
		return hl;
	}
	
}
